package com.yic.module.mes.enums;

import com.yic.framework.common.exception.ErrorCode;

/**
 * MES 错误码枚举类
 * <p>
 * MES 系统，使用 1_020_000_000 段
 */
public interface ErrorCodeConstants {

    // ==========  工艺信息模块 1_020_000_000 ==========
    ErrorCode PROCESS_NOT_EXISTS = new ErrorCode(1_020_000_000, "工艺信息不存在");
    ErrorCode PROCESS_NAME_EXISTS = new ErrorCode(1_020_000_001, "工艺名称已存在");
    ErrorCode PROCESS_CODE_EXISTS = new ErrorCode(1_020_000_002, "工艺代码已存在");
    ErrorCode PROCESS_CODE_USED = new ErrorCode(1_020_000_003, "工艺已被使用，不允许删除");

    // ==========  工艺路线模块 1_020_001_000 ==========
    ErrorCode PROCESS_ROUTE_NOT_EXISTS = new ErrorCode(1_020_001_000, "工艺路线不存在");
    ErrorCode PROCESS_ROUTE_CODE_EXISTS = new ErrorCode(1_020_001_001, "工艺路线代码已存在");
    ErrorCode PROCESS_ROUTE_USED = new ErrorCode(1_020_001_002, "工艺路线已被使用，不允许删除");

    // ==========  工艺配置模块 1_020_002_000 ==========
    ErrorCode PROCESS_ROUTE_INFO_NOT_EXISTS = new ErrorCode(1_020_002_000, "工艺路线配置信息不存在");
    ErrorCode PROCESS_ROUTE_INFO_MAIN_EXISTS = new ErrorCode(1_020_002_001, "工艺路线配置只能有一道关键工序");

    // ==========  产品生产信息模块 1_020_003_000 ==========
    ErrorCode ITEM_PRODUCE_NOT_EXISTS = new ErrorCode(1_020_003_000, "产品生产信息不存在");

    ErrorCode ITEM_PRODUCE_EXISTS = new ErrorCode(1_020_003_001, "当前工厂已存在该产品生产信息");

    ErrorCode ITEM_PRODUCE_ONLY_ONE_DEFAULT_ROUTE = new ErrorCode(1_020_003_003, "产品生产信息中有且只能存在一个默认产品工艺路线");

    ErrorCode ITEM_PRODUCE_USED = new ErrorCode(1_020_003_003, "当前产品已被使用，不允许删除");

    // ==========  产品工艺路线模块 1_020_004_000 ==========
    ErrorCode ITEM_PRODUCE_ROUTE_NOT_EXISTS = new ErrorCode(1_020_004_000, "产品工艺路线不存在");

    // ==========  产品工艺路线模块 1_020_005_000 ==========
    ErrorCode ITEM_PRODUCE_ROUTE_EXTEND_NOT_EXISTS = new ErrorCode(1_020_005_000, "产品工艺路线扩展信息不存在");

    // ==========  生产计划模块 1_020_006_000 ==========
    ErrorCode PLAN_NOT_EXISTS = new ErrorCode(1_020_006_000, "生产计划信息不存在");
    ErrorCode PLAN_CODE_EXISTS = new ErrorCode(1_020_006_001, "生产计划单号已存在");
    ErrorCode PLAN_NOT_CHANGE = new ErrorCode(1_020_006_002, "当前计划已经排产，不允许变更");
    ErrorCode PLAN_NOT_FOUND_FACTORY = new ErrorCode(1_020_006_003, "ERP生产工单【{}】抛转MES失败：MES系统无法匹配工厂信息");
    ErrorCode PLAN_NOT_FOUND_CENTER = new ErrorCode(1_020_006_004, "ERP生产工单\"{}\"抛转MES失败：MES系统无法匹配工作中心信息");
    ErrorCode PLAN_NOT_FOUND_ITEM = new ErrorCode(1_020_006_004, "ERP生产工单\"{}\"抛转MES失败：MES系统无法匹配产品信息");

    // ==========  生产排产模块 1_020_007_000 ==========
    ErrorCode MO_NOT_EXISTS = new ErrorCode(1_020_007_000, "生产计划排产信息不存在");
    ErrorCode MO_PLAN_NOT_EXISTS = new ErrorCode(1_020_007_001, "工单号\"{}\"不存在");
    ErrorCode MO_NOT_PRODUCE = new ErrorCode(1_020_007_002, "生产计划单号\"{}\"不允许排产");
    ErrorCode MO_PRODUCE_AMOUNT_EXCEED = new ErrorCode(1_020_007_003, "工单号\"{}\"排产数量超过预计产量，不允许排产");
    ErrorCode MO_FACTORY_NOT_SAME = new ErrorCode(1_020_007_004, "排产明细中的工厂不一致");
    ErrorCode MO_WORKSHOP_NOT_SAME = new ErrorCode(1_020_007_005, "排产明细中的生产车间不一致");
    ErrorCode MO_NOT_CHANGE = new ErrorCode(1_020_007_006, "当前工单已开始生产，不允许变更");
    ErrorCode MO_IN_GT_PRODUCE = new ErrorCode(1_020_007_007, "入库数量不允许大于排产数量");
    ErrorCode MO_SERIAL_NOT_EMPTY = new ErrorCode(1_020_007_008, "工单号\"{}\"流水号不能为空");


    // ==========  工单工艺路线模块 1_020_008_000 ==========
    ErrorCode MO_ROUTE_NOT_EXISTS = new ErrorCode(1_020_008_000, "工单工艺路线不存在");
    ErrorCode MO_ROUTE_ERROR = new ErrorCode(1_020_008_001, "工单工艺路线配置错误");

    // ==========  工单生产明细模块 1_020_009_000 ==========
    ErrorCode MO_DETAIL_NOT_EXISTS = new ErrorCode(1_020_009_000, "工单生产明细不存在");
    ErrorCode MO_DETAIL_NOT_EQUAL_PRODUCE_AMOUNT = new ErrorCode(1_020_009_001, "工单号\"{}\"的流水号数量与排产数量不一致，请检查流水号");
    ErrorCode MO_DETAIL_NOT_REPEAT = new ErrorCode(1_020_009_001, "流水号不允许重复");


    // ==========  生产报工模块 1_020_010_000 ==========
    ErrorCode REPORT_NOT_EXISTS = new ErrorCode(1_020_010_000, "生产报工信息不存在");
    ErrorCode REPORT_DEPT_DIFFERENT = new ErrorCode(1_020_010_001, "生产部门与员工所在部门不一致");
    ErrorCode REPORT_MO_ED = new ErrorCode(1_020_010_002, "当前工单已生产完成，不允许报工");
    ErrorCode REPORT_AMOUNT_EXCEED = new ErrorCode(1_020_010_003, "报工数量超出排产数量，不允许报工");
    ErrorCode REPORT_AMOUNT_EXCEED_UP_PROCESS = new ErrorCode(1_020_010_004, "当前工序报工数量超出上道工序数量，当前工序允许报工数量\"{}\"");
    ErrorCode REPORT_REPORT_TYPE_ERROE = new ErrorCode(1_020_010_005, "报工类型配置错误，请联系系统管理员处理");
    ErrorCode REPORT_NOT_UP_PROCESS = new ErrorCode(1_020_010_006, "上道工序未开始报工，请稍后再试");
    ErrorCode REPORT_CENTER_USER_NOT_EXISTS = new ErrorCode(1_020_010_007, "员工未在工作中心绑定，不允许报工");
    ErrorCode REPORT_SERIAL_NOT_EMPTY = new ErrorCode(1_020_010_008, "流水号不允许为空");
    ErrorCode REPORT_SERIAL_REPORT_AMOUNT_ONE = new ErrorCode(1_020_010_009, "流水号报工模式，报工数量只能为1");
    ErrorCode REPORT_SERIAL_USED = new ErrorCode(1_020_010_010, "流水号已被使用，请重新录入流水号");
    ErrorCode REPORT_MAIN_ROUTE_CREATED = new ErrorCode(1_020_010_011, "关键工序已报功，不允许该工序报工");
    ErrorCode REPORT_SERIAL_MORE_USED = new ErrorCode(1_020_010_012, "流水号被多工单使用，联系管理员处理");
    ErrorCode REPORT_SERIAL_OTHER_USED = new ErrorCode(1_020_010_013, "流水号被其他工单使用");
    ErrorCode REPORT_TYPE_NOT_MATE = new ErrorCode(1_020_010_014, "报工类型不匹配");
    ErrorCode REPORT_SERIAL_NOT_EXISTS = new ErrorCode(1_020_010_015, "流水号与生产工单不匹配");

    // ==========  生产报工工时模块 1_020_011_000 ==========
    ErrorCode REPORT_WORK_HOURS_NOT_EXISTS = new ErrorCode(1_020_011_000, "生产报工工时不存在");


















}

